Dispose the Source Object when dispose() is called, avoiding that it could be
called twice on a destroyed Source.
So, notify count changes before destroying the object, and don't emit this
twice on destroyNonResidentNotifications (as if a notification is destroyed
the property notify will happen in the notification destroy callback anyways).
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
return;
this.notifications.splice(index, 1);
+ this.countUpdated();
+
if (this.notifications.length == 0)
this.destroy();
-
- this.countUpdated();
}
pushNotification(notification) {
notifications[i].destroy(reason);
this.emit('destroy', reason);
+
+ this.run_dispose();
}
iconUpdated() {
for (let i = this.notifications.length - 1; i >= 0; i--)
if (!this.notifications[i].resident)
this.notifications[i].destroy();
-
- this.countUpdated();
}
});